-
Notifications
You must be signed in to change notification settings - Fork 483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix audit report that verifies a secret #620
Conversation
…ext dont get a None context
So just to clarify, if this doesn't fix #611, what does it fix? |
@lorenzodb1 This was uncovered while I was investigating #611. When I was investigating #611 I had some AWS secrets in my baseline. These secrets have a verify on them (We can reach out to an external to verify if they are truly secrets). After a recent change in the scan functionality for a regular scan - we pass in our context to lines we analyze so we can verify them. Since we are reverse engineering a scan - we should pass the context in to analyze lines for an audit as well. This was not a known issue because context is a parameter for the analyze function with None default. So it worked fine until we hit the verify which occasionally requires a context (depending on the dependency injection). So when it tried to audit a AWS secret - it was receiving a None context - causing an error. |
Good catch there! I'm wondering if we should add or modify a test case to better detect similar issues in the future? |
…. Add unit test so we ensure we are calling a verify for audit unit tests
Problem:
Solution: